﻿using System;
using System.Data;
using System.Data.SqlClient;

using MySql.Data.MySqlClient;

public class DatabaseHelper
{
    private string connectionString;

    public DatabaseHelper(string connectionString)
    {
        this.connectionString = connectionString;
    }

    public MySqlConnection GetConnection()
    {
        return new MySqlConnection(connectionString);
    }

    //public static DataTable GetDataTable(string query)
    //{
    //    DataTable dt = new DataTable();

    //    using (MySqlConnection conn = GetConnection())
    //    {
    //        MySqlCommand cmd = new MySqlCommand(query, conn);

    //        MySqlDataAdapter da = new MySqlDataAdapter(cmd);

    //        da.Fill(dt);
    //    }

    //    return dt;
    //}
}
